home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / Disks.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.5 KB  |  120 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Disks.a
  3. ;
  4. ;    Contains:    Disk Driver Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1985-1991,1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DISKS__') = 'UNDEFINED' THEN
  18. __DISKS__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  24.     include 'OSUtils.a'
  25.     ENDIF
  26.  
  27.  
  28. sony                            EQU        0
  29. hard20                            EQU        1
  30. ;  Disk Driver Status csCodes 
  31.  
  32. kReturnFormatList                EQU        6                    ; .Sony 
  33. kDriveStatus                    EQU        8
  34. kMFMStatus                        EQU        10
  35. ;  Disk Driver Control csCodes 
  36.  
  37. kVerify                            EQU        5
  38. kFormat                            EQU        6
  39. kEject                            EQU        7
  40. kSetTagBuffer                    EQU        8                    ; .Sony 
  41. kTrackCache                        EQU        9                    ; .Sony 
  42. kDriveIcon                        EQU        21
  43. kMediaIcon                        EQU        22
  44. kDriveInfo                        EQU        23
  45. kRawTrack                        EQU        18244                ; .Sony: “diagnostic” raw track dump 
  46. ;    Note:
  47. ;
  48. ;    qLink is usually the first field in queues, but back in the MacPlus
  49. ;    days, the DrvSts record needed to be expanded.  In order to do this without
  50. ;    breaking disk drivers that already added stuff to the end, the fields
  51. ;    where added to the beginning.  This was originally done in assembly language
  52. ;    and the record was defined to start at a negative offset, so that the qLink
  53. ;    field would end up at offset zero.  When the C and pascal interfaces where
  54. ;    made, they could not support negative record offsets, so qLink was no longer
  55. ;    the first field.  Universal Interfaces are auto generated and don't support
  56. ;    negative offsets for any language, so DrvSts in Disks.a has qLinks at a
  57. ;    none zero offset.  Assembly code which switches to Universal Interfaces will
  58. ;    need to compensate for that.
  59. ;
  60. ;
  61.  
  62.  
  63. DrvSts                    RECORD 0
  64. track                     ds.w    1                ; offset: $0 (0)        ;  current track 
  65. writeProt                 ds.b    1                ; offset: $2 (2)        ;  bit 7 = 1 if volume is locked 
  66. diskInPlace                 ds.b    1                ; offset: $3 (3)        ;  disk in drive 
  67. installed                 ds.b    1                ; offset: $4 (4)        ;  drive installed 
  68. sides                     ds.b    1                ; offset: $5 (5)        ;  -1 for 2-sided, 0 for 1-sided 
  69. qLink                     ds.l    1                ; offset: $6 (6)        ;  next queue entry 
  70. qType                     ds.w    1                ; offset: $A (10)        ;  1 for HD20 
  71. dQDrive                     ds.w    1                ; offset: $C (12)        ;  drive number 
  72. dQRefNum                 ds.w    1                ; offset: $E (14)        ;  driver reference number 
  73. dQFSID                     ds.w    1                ; offset: $10 (16)        ;  file system ID 
  74. twoSideFmt                 ds.b    1                ; offset: $12 (18)        ;  after 1st rd/wrt: 0=1 side, -1=2 side 
  75. needsFlush                 ds.b    1                ; offset: $13 (19)        ;  -1 for MacPlus drive 
  76. diskErrs                 ds.w    1                ; offset: $14 (20)        ;  soft error count 
  77.                          ORG 18
  78. driveSize                 ds.w    1                ; offset: $12 (18)
  79. driveS1                     ds.w    1                ; offset: $14 (20)
  80. driveType                 ds.w    1                ; offset: $16 (22)
  81. driveManf                 ds.w    1                ; offset: $18 (24)
  82. driveChar                 ds.w    1                ; offset: $1A (26)
  83. driveMisc                 ds.b    1                ; offset: $1C (28)
  84.                          ORG 30
  85. sizeof                     EQU *                    ; size:   $1E (30)
  86.                         ENDR
  87. DrvSts2                    RECORD 0
  88. f                         ds        DrvSts
  89. sizeof                     EQU *                    ; size:   $1E (30)
  90.                         ENDR
  91.  
  92.  
  93.  
  94. kdqManualEjectBit                EQU        5
  95. ;
  96. ; pascal OSErr DiskEject(short drvNum)
  97. ;
  98.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  99.         IMPORT_CFM_FUNCTION DiskEject
  100.     ENDIF
  101.  
  102. ;
  103. ; pascal OSErr SetTagBuffer(void *buffPtr)
  104. ;
  105.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  106.         IMPORT_CFM_FUNCTION SetTagBuffer
  107.     ENDIF
  108.  
  109. ;
  110. ; pascal OSErr DriveStatus(short drvNum, DrvSts *status)
  111. ;
  112.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  113.         IMPORT_CFM_FUNCTION DriveStatus
  114.     ENDIF
  115.  
  116.  
  117.     ENDIF ; __DISKS__ 
  118.  
  119.